🎭 Event Delegation & Propagation

Master Event Flow, Bubbling, and Delegation

📊 Event Propagation Flow

Event Flow Phases:

  • Capture Phase: Event travels down from window to target
  • Target Phase: Event reaches the target element
  • Bubble Phase: Event bubbles up from target to window
🔴 Grandparent
🔵 Parent
🟢 Child
🟡 Click Me!
Click on nested boxes to see event flow...

🎯 Event Delegation

Event Delegation Benefits:

  • Better performance - single listener for many elements
  • Works with dynamically added elements
  • Reduced memory usage
  • Simpler code maintenance
Delegation events will appear here...

📈 Event Statistics

0
Capture Events
0
Bubble Events
0
Delegated Events
0
Dynamic Items